package com.cms.common.hook.enums;

public enum PluginsTypeEnum {

    PLUGIN_OAUTH("oauth", "oauth", "plugins-oauth"),
    PLUGIN_FEATURE("feature", "feature", "plugins-feature");

    // 成员变量
    private String label;
    private String labelKey;
    private String pluginDir;

    // 构造方法
    private PluginsTypeEnum(String label, String labelKey, String pluginDir) {
        this.label = label;
        this.labelKey = labelKey;
        this.pluginDir = pluginDir;
    }

    // 普通方法
    public static String getLabel(String pluginDir) {
        for (PluginsTypeEnum c : PluginsTypeEnum.values()) {
            if (c.getPluginDir().equals(pluginDir)) {
                return c.getLabel();
            }
        }
        return null;
    }


    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getLabelKey() {
        return labelKey;
    }

    public void setLabel_key(String labelKey) {
        this.labelKey = labelKey;
    }

    public String getPluginDir() {
        return pluginDir;
    }

    public void setPluginDir(String pluginDir) {
        this.pluginDir = pluginDir;
    }
}
